<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <script>
            function f1() {
                // window.alert("test");
                // var r=window.confirm("test");
                var r=window.prompt("test");

                console.log(r);
            }
        </script>
    </head>
    <body>
        <a href="javascript:;" onclick="f1();">test</a>
    </body>
</html>